const xlsx = require('xlsx');

const data = [
    ['Tom', 'Nick', 'John'],
    [20, 21, 19],
    [20, 21, 19],
]
const opts = {
    // sheetStubs:true,
    // password:""
}
console.log(data)
const worksheet = xlsx.utils.aoa_to_sheet(data,opts);


console.log(worksheet)
const workbook = xlsx.utils.book_new();
xlsx.utils.book_append_sheet(workbook, worksheet, 'Sheet1');
xlsx.writeFile(workbook, './xlsx/2.xlsx');